package com.mkydy.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mkydy.entity.Dept;
import com.mkydy.service.DeptService;

@Controller
@RequestMapping("/dept")
public class DeptController {

	@Resource(name="deptService")
	private DeptService deptService;
	
	@RequestMapping(value="/addDept")
	public String addDept(Dept dept) {
		deptService.addDept(dept);
		return "index";
	}
	
	@RequestMapping(value="/hello")
	public String sayHello() {
		return "hello";
	}
	
	@RequestMapping(value="/index")
	public String index() {
		return "index";
	}
	
	@RequestMapping(value="/login")
	public String login() {
		System.out.println("我进来了");
		return "login";
	}
}
